home *** CD-ROM | disk | FTP | other *** search
/ Introduction to 3D Game …ogramming with DirectX 12 / Introduction-to-3D-Game-Programming-with-DirectX-12.ISO / Code.Textures / Chapter 15 First Person Camera and Dynamic Indexing / CameraAndDynamicIndexing / FrameResource.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  2016-03-02  |  598 b   |  17 lines

  1. #include "FrameResource.h"
  2.  
  3. FrameResource::FrameResource(ID3D12Device* device, UINT passCount, UINT objectCount, UINT materialCount)
  4. {
  5.     ThrowIfFailed(device->CreateCommandAllocator(
  6.         D3D12_COMMAND_LIST_TYPE_DIRECT,
  7.         IID_PPV_ARGS(CmdListAlloc.GetAddressOf())));
  8.  
  9.     PassCB = std::make_unique<UploadBuffer<PassConstants>>(device, passCount, true);
  10.     MaterialBuffer = std::make_unique<UploadBuffer<MaterialData>>(device, materialCount, false);
  11.     ObjectCB = std::make_unique<UploadBuffer<ObjectConstants>>(device, objectCount, true);
  12. }
  13.  
  14. FrameResource::~FrameResource()
  15. {
  16.  
  17. }